home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / MacMETH 3.2.4 / Examples / Buggy.MOD < prev    next >
Encoding:
Text File  |  1996-06-20  |  276 b   |  18 lines  |  [TEXT/MEDT]

  1. MODULE Buggy; (* W. Heiz, 4-Apr-86 *)
  2.  
  3.   (* contains 1 syntax and 1 run-time error *)
  4.  
  5.   VAR x : CARDINAL;
  6.       a : ARRAY [0..10] OF BOOLEAN;
  7.  
  8.   PROCEDURE P(i : CARDINL; p : BOOLEAN);
  9.   BEGIN
  10.     a[i] := p;
  11.   END P;
  12.   
  13. BEGIN 
  14.   x := 14;
  15.   P(0,TRUE);
  16.   P(x,FALSE);
  17. END Buggy.
  18.